
import http from "@/utils/http2.js";

/**
 * 查询调拨单列表
 */
export function allocateList(data) {
  return http.post("/api/allocate/list", data);
}

/**
 * 根据调拨单id批量删除调拨单
 */
export function DeleteAllocates(ids) {
  return http.delete("/api/allocate/batchDelete?ids=" + ids, ids);
}

/**
 * 根据调拨单明细id批量删除调拨单明细
 */
export function DeleteAllocatesDetails(ids) {
  return http.delete("/api/allocate/batchByDelete?ids="+ids, ids);
}


/**
 * 根据企业id查询仓库信息
 */
export function getWarehouseList(data) {
  return http.post("/api/set/goods/warehouse", data);
}

/**
 * 新增调拨单
 */
export function SaveAllocate(data) {
  return http.post("/api/allocate/save", data);
}

/**
 * 根据调拨单id查询调拨单
 */
export function getAllocateById(id) {
  return http.get("/api/allocate/get?id=" + id);
}

/**
 * 批量审核反审核调拨单
 */
export function auditAllocate(data) {
  return http.put("/api/allocate/audit",data);
}


/**
 * 导出审核调拨单
 */
export function exportAllocate(){
  return http.post("/api/allocate/export",{});
}



/**
 * 盘点列表
 */
export function getInventoryList(data) {
  return http.post("/api/inventory/list", data);
}


/**
 * 导出盘点列表
 */
export function exportInventory() {
  return http.post("/api/inventory/export", {});
}


/**
 * 库存列表查询
 */
export function inventoryQuery(data) {
  return http.post("/api/inventory/stock/list", data);
}